clear
set type double
set more 1

***************************************
*NOTES
*Table 3 - robust checks for export currency baseline table 
*********************************************************************

capture log using log/Table3_xchoice_robust.log, replace


use ../data/xcurrencychoice_estdata, clear
*merge in additional variables
*firm-level variables
	merge m:1 vat using ../data/Additional_Variables, keep(match master) nogen
	replace coverage=coverage/100
	replace shRD=0 if missing(shRD)
	gen lnassets=ln(tot_assets)
	
*******************************
*REV TABLE 3
*rbustness of table 2
**************************************
eststo clear


*add one additional variable at a time
foreach var in ez_exportsh exports_sales inFDI outFDI shRD lntfp_n {

	eststo: reghdfe Ix mphi_xeu lnmemp ms `var', absorb(cp date) cluster(vat)
	 }
	

*combined financial variables
	eststo: reghdfe Ix mphi_xeu lnmemp ms cash_STdebt coverage leverage, absorb(cp date) cluster(vat) 
	
	

esttab using "../results/Table3_xchoice_robust.csv", se  b(3) se(3) r2 ar2 star(* 0.10 ** 0.05 *** 0.01) compress replace
eststo clear

log close



	
exit


